import http from '../utils/http'

/**
 * 获得选中联系人信息
 */
export const getCheckedContates=(arr)=>{
  return http.get(`/ucontacts/getContatesByList`,{'arr':arr})
}
/**
 * @description 新增订单
 * @param {*} order 
 */
export const reqInsorder = (order) => {
  return http.post(`/order/insorder`, order, {
    headers: {
      'Content-Type': 'application/json'
    }
  });
};
/**
 * @description 修改订单状态
 * @param {*} status 
 */
export const reqUpdorder=(status,orderNo)=>{
  return http.get(`/order/updOrder`,{'status':status,'orderNo':orderNo})
}

// export const reqUpdinventory=(inventory,product_detail_id)=>{
//   return http.get(`/productdetail/updinventory`,{'inventory':inventory,'product_detail_id':product_detail_id})
// }

/**
 * @description 判断订单是不是已经存在了
 * @param {*} orderNo 
 */
export const reqSelstatus=(detail_id,user_id)=>{
  return http.get(`/order/selstatus`,{'detail_id':detail_id,'user_id':user_id})
}
/**
 * 查看订单里面的常用联系人
 * @param {*} ids 
 */
export const reqIds=(ids)=>{
  return http.get(`/ucontacts/ids`,{'ids':ids})
}
/**
 * @description 修改申请状态
 * @param {*} order_id 
 */
export const reqUpdorderstatus=(order_id)=>{
    return http.get(`/order/updorderstatus`,{order_id:order_id})
}

export const reqGetorder=(orderNo)=>{
  return http.get(`/order/getorder`,{'orderNo':orderNo})
}

export const prevent=(orderno)=>{
  return http.get(`/order/prevent`,{'orderno':orderno})
}

export const updhot=()=>{
  return http.get(`/tproduct/updhot`)
}
